<?php defined('InShopNC') or exit('Access Invalid!');?>
<style>
.ncc-table-style tbody tr.item_disabled td {
	background: none repeat scroll 0 0 #F9F9F9;
	height: 30px;
	padding: 10px 0;
	text-align: center;
}
</style>
<div class="ncc-receipt-info">
	<div class="ncc-receipt-info-title">
  <h3>电子兑换码/券接收方式</h3>
  </div>
 <div id="invoice_list" class="ncc-candidate-items">
        <ul style="overflow: visible;">
          <li>手机号码：
            <div class="parentCls"><input name="buyer_phone" class="inputElem text" autocomplete="off" type="text" id="buyer_phone" value="" maxlength="11"></div>
          </li>
        </ul>
        <p><i class="icon-info-sign"></i>您本次购买的商品不需要收货地址，请正确输入接收手机号码，确保及时获得“电子兑换码”。可使用您已经绑定的手机或重新输入其它手机号码。</p>
  </div>
</div>
<div class="ncc-receipt-info">
 <div class="ncc-receipt-info-title">
    <h3>商品清单</h3>
  </div>
  <table class="ncc-table-style">
    <thead>
      <tr>
        <th class="w20"></th>
        <th></th>
        <th><?php echo $lang['cart_index_store_goods'];?></th>
        <th class="w120"><?php echo $lang['cart_index_price'].'('.$lang['currency_zh'].')';?></th>
        <th class="w120"><?php echo $lang['cart_index_amount'];?></th>
        <th class="w120"><?php echo $lang['cart_index_sum'];?></th>
      </tr>
    </thead>
    <?php foreach($output['store_cart_list'] as $store_id => $cart_list) {?>
    <tbody>
      <tr>
        <th colspan="20"><i class="icon-home"></i><a target="_blank" href="<?php echo urlShop('show_store','index',array('store_id'=>$store_id));?>"><?php echo $cart_list[0]['store_name']; ?></a>

        </th>
      </tr>
      <?php foreach($cart_list as $cart_info) {?>
      <tr id="cart_item_<?php echo $cart_info['cart_id'];?>" class="shop-list <?php echo ($cart_info['state'] && $cart_info['storage_state']) ? '' : 'item_disabled';?>">
        <td><?php if ($cart_info['state'] && $cart_info['storage_state']) {?>
          <input type="hidden" value="<?php echo $cart_info['cart_id'].'|'.$cart_info['goods_num'];?>" name="cart_id[]">
          <?php } ?></td>
        <?php if ($cart_info['bl_id'] == '0') {?>
        <td class="w60"><a href="<?php echo urlShop('goods','index',array('goods_id'=>$cart_info['goods_id']));?>" target="_blank" class="ncc-goods-thumb"><img src="<?php echo thumb($cart_info,60);?>" alt="<?php echo $cart_info['goods_name']; ?>" /></a></td>
        <?php } ?>
        <td class="tl" <?php if ($cart_info['bl_id'] != '0') {?>colspan="2"<?php }?>><dl class="ncc-goods-info">
            <dt><a href="<?php echo urlShop('goods','index',array('goods_id'=>$cart_info['goods_id']));?>" target="_blank"><?php echo $cart_info['goods_name']; ?></a></dt>
            <dd>
            
            </dd>
          </dl></td>
        <td class="w120">￥<em><?php echo $cart_info['goods_price']; ?></em></span></td>
		<td class="w120 ws0">
		<a href="JavaScript:void(0);" onclick="decrease_quantity();" class="add-substract-key ">-</a>
            <input id="quantity" name="quantity" value="<?php echo $cart_info['state'] ? $cart_info['goods_num'] : ''; ?>" maxvalue="<?php echo $output['goods_info']['g_vlimit']; ?>" price="<?php echo $cart_info['goods_price']; ?>" onkeyup="change_quantity(this);" type="text" class="text w20">
            <a href="JavaScript:void(0);" title="最多允许购买<?php echo $output['goods_info']['g_vlimit']; ?>件" onclick="add_quantity();" class="add-substract-key tip">+</a>
		</td>
       
        <td class="w120"><?php if ($cart_info['state'] && $cart_info['storage_state']) {?>
          ￥<em id="item_subtotal" nc_type="eachGoodsTotal"><?php echo $cart_info['goods_total']; ?></em>
          <?php } elseif (!$cart_info['storage_state']) {?>
          <span style="color: #F00;">库存不足</span>
          <?php }elseif (!$cart_info['state']) {?>
          <span style="color: #F00;">已下架</span>
          <?php }?>
		  </td>
      </tr>
      
     
      <?php } ?>
      
    
      
      <tr>
        <td class="w10"></td>
        <td class="tl" colspan="2">买家留言：
          <input type="text" value="" class="text w340" name="pay_message[<?php echo $store_id;?>]" maxlength="150">
          &nbsp;</td>
        <td class="tl" colspan="10"><div class="ncc-form-default"> </div></td>
      </tr>
     
      <?php }?>

     

    </tbody>
    <tfoot>
      <tr>
        <td colspan="20"><div class="ncc-all-account">订单总金额：￥<em id="cartTotal"></em>元</div></td>
      </tr>
    </tfoot>
  </table>
</div>
